function MyNew (fn, ...args) {
  let obj = Object.create(fn.prototype)
  let result = fn.apply(obj, args)
  return typeof result === 'object' && result !== null ? result : obj
}

function Car (name) {
  this.name = name
}

let a = MyNew(Car, 'c5x')
console.log(a);